﻿using CodeGenerator.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using CodeGenerator.Util;

namespace CodeGenerator.Template.Service.Properties
{
    public partial class AssemblyInfo : ITemplate
    {
        private MetaData _data;
        public MetaData Data
        {
            get
            {
                if (_data == null)
                {
                    _data = new MetaData
                    {
                        Models = new List<ClassModel>()
                    };
                }
                return _data;
            }
            set
            {
                if (_data == null)
                {
                    _data = new MetaData
                    {
                        Models = new List<ClassModel>()
                    };
                }
                _data = value;
            }
        }
        public List<LookupClassModel> lookups { get; set; }
        public List<PickupListModel> pickuplist { get; set; }

        public string Filename
        {
            get { return "AssemblyInfo.cs"; }
        }
        //public void Generate(String outputPath)
        //{
        //    String destiationFolder = Path.Combine(outputPath, @"/{ProjectName}.Service/Properties/");    // Configure folder structure

        //    DirectoryExt.CreateIfMissing(destiationFolder); // Create destination folder
            
        //    const string filename = "AssemblyInfo.cs"; // Confiure Filename

        //    String outputPathWithName = Path.Combine(destiationFolder, filename);  // Combine target folder with filename

        //    using (TextWriter writer = File.CreateText(outputPathWithName)) // create file and write file context
        //    {
        //        writer.Write(this.TransformText());
        //    }
        //}
    }
}
